Fix anat-to-tpl xfm grabbed#293
Merged
Merged
Conversation
The self-hosted runner's network blocks raw.githubusercontent.com, causing setup-uv to fail when fetching the version manifest. Pinning the version skips the network lookup entirely.
The mocks used `long_to_anat_xfm`/`anat_to_long_xfm` but the actual NamedTuple fields are `long_to_template_xfm`/`template_to_long_xfm`. Mock() silently creates any attribute, so this mismatch was invisible.
_render_stat_overlay was calling _build_mosaic independently for the background and stat map. Since _axial_slices picks slices based on non-zero extent, the z-scored maps (which have zeros outside the mask and negative values) computed different slice indices than the template BOLD underlay, causing visible misalignment in the overlay. Now computes slice indices once from the background volume and reuses them for the stat map.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #288
Summary
resolve_functionalqueried the inverse warp (from-MNI152NLin6Asym_to-T1w) foranat_to_template, butresample_bold_to_templateexpects the forward warp (from-T1w_to-MNI152NLin6Asym) since ANTs applies transforms in reverse list orderorchestration/all.pywhereanat_outputs.inverse_xfmwas passed asanat_to_templatefor the in-memory (non-resolved) code pathforward_xfm/inverse_xfmto direction-explicit names (anat_to_template_xfm,template_to_anat_xfm, etc.) across all NamedTuples, exports, and testsT1w<->longitudinal, actuallylongitudinal<->MNI152NLin6Asym)Mock()auto-creates any attribute)_render_stat_overlaywas computing slice indices independently for background and overlay, causing different axial slices to be selected (z-scored maps have a different non-zero extent than the template BOLD)Test plan
resample_bold_to_templateon real data with both forward and inverse warps to confirm the forward warp produces correct results